<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>会员管理</title>
	<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    	<span>位置：</span>
	    <ul class="placeul"><li><a href="/index.html">首页</a></li><li>会员管理</li></ul>
    </div>
    
    <div class="rightinfo">
	    <div class="tools">
	    	<ul class="toolbar">
		        <li class="click"><a href="/user/info/add.html"><span><img src="/images/t01.png" /></span>添加会员</a></li>
		        <li id="delBatch"><span><img src="/images/t03.png" /></span>批量删除</li>
	        </ul>
	        <ul class="toolbar1">
	        	<form action="/user/info/infos.html" method="post">
		        	<span>
		        		<input name="username" class="scinput" type="text" value="${(info.username)!""}" autocomplete="off" placeholder="登录用户名">
					    <!-- 暂时不做 TODO GXG -->
					    <!-- 
		        		<input name="memberLevelId" class="scinput" type="text" value="${(info.memberLevelId)!""}" autocomplete="off" placeholder="会员等级ID">
		        		<input name="memberLevelName" class="scinput" type="text" value="${(info.memberLevelName)!""}" autocomplete="off" placeholder="会员等级名称">
		        		 -->
		        		<input name="mobile" class="scinput" type="text" value="${(info.mobile)!""}" autocomplete="off" placeholder="手机号">
		        		<input name="realname" class="scinput" type="text" value="${(info.realname)!""}" autocomplete="off" placeholder="真实姓名">
		        		<select class="select3" name="type" style="width: 100px;">
						    <option value="">请选择类型</option>
						    <option value=1 <#if (info.type)?? && (info.type)?number ==1>selected="selected"</#if>>酒坊会员</option>
						    <option value=2 <#if (info.type)?? && (info.type)?number ==2>selected="selected"</#if>>酒坊大使</option>
					    </select>
		        		<select class="select3" name="gender" style="width: 100px;">
						    <option value="">请选择性别</option>
						    <option value=1 <#if (info.gender)?? && (info.gender)?number ==1>selected="selected"</#if>>男</option>
						    <option value=2 <#if (info.gender)?? && (info.gender)?number ==2>selected="selected"</#if>>女</option>
						    <option value=3 <#if (info.gender)?? && (info.gender)?number ==3>selected="selected"</#if>>保密</option>
					    </select>
				    	<input type="submit" class="scbtn" value="查询"/>
		        	</span>
	    		</form>
	        </ul>
	    </div>
        
    	<table class="tablelist">
	    	<thead>
		    	<tr>
			        <th width="4%"><input  type="checkbox" class="check_box" id="allChk"></input></th>
			        <th width="6%">ID</th>
			        <th width="12%">用户名</th>
			        <th width="8%">真实姓名</th>
			        <th width="8%">用户类型</th>
			        <th width="8%">手机号</th>
			        <th width="4%">性别</th>
			        <th width="10%">会员积分</th>
			        <th width="10%">出生日期</th>
			        <th width="14%">注册时间</th>
			        <th width="16%">操作</th>
		        </tr>
	        </thead>
	        <tbody>
	        <#if infos??>
			  		<#list infos as item>
						<tr>
					        <td><input type="checkbox" class="check_box" name="colChk" value=${(item.id)!0}></input></td>
					        <td>${(item.id)!""}</td>
					        <td>${(item.username)!"--"}</td>
					        <td>${(item.realname)!"--"}</td>
					        <td><#if item.type?? && item.type=2>酒坊大使<#else>酒坊会员</#if></td>
					        <td>${(item.mobile)!"--"}</td>
					        <td><#if item.gender??><#if item.gender=1>男<#elseif item.gender=2>女<#elseif item.gender=3>保密</#if><#else>--</#if></td>
					        <td><a href="/user/score/scores.html?userId=${item.id}">${(item.memberScore)!0}&ensp;分</a></td>
					        <td><#if item.birthday?exists>${(item.birthday)?string("yyyy-MM-dd")}<#else>--</#if></td>
					        <td><#if item.createTime?exists>${(item.createTime)?string("yyyy-MM-dd HH:mm:ss")}<#else>--</#if></td>
					        <td>
						        <p>
						        	<a href="/user/info/view/${item.id}.html">查看</a>&ensp;|&ensp;
						        	<a href="/user/info/edit/${item.id}.html">编辑</a>&ensp;|&ensp;
						        	<a href="javascript:void(0);" name="delBtn" dataId=${(item.id)!0}>删除</a>
						        </p>
						        <p>
						        	<a href="/user/info/edit/${item.id}.html">重置密码</a>&ensp;|&ensp;
						        	<a href="/order/info/infos.html?userId=${item.id}">订单</a>&ensp;|&ensp;
						        	<a href="/user/score/scores.html?userId=${item.id}">积分</a>
						        </p>
					        </td>
				        </tr> 
			  		</#list>
			  	</#if>
	        </tbody>
	    </table>
   		<#import "/common/pager.ftl" as page>
		<#if count??>
			<@page.pager start=start size=size count=count url="/user/info/infos.html?t=admin" gotoPage=true />
		</#if>
		
		<!-- 以下为弹出层 -->
		<!-- 数据编辑弹出层，全部逻辑放一起处理了，根据不同操作来显示 -->
		<div class="tip width-320" id="tipDiv">
			<div class="tiptop"><span id="tipTitie">修改价格</span><a></a></div>
			<div class="tipinfo2">
		    	<input id="wareId" name="id" type="hidden" />
		    	<input id="opType" type="hidden" />
			    <ul class="forminfo">
				    <li class="contentWapper" name="confirmLi">
				    	<img src="/images/warning_72px.png" class="tip-confim-img" ></img>
		    			<span class="tip-confim-text"></span>
				    </li>
				    <li class="contentWapper" name="numberInventoryLi">
				    	<label>库存数量：</label>
				    	<input id="numberInventory" type="text" class="dfinput" />&ensp;件
				    </li>
				    <li class="contentWapper" name="priceLi">
				    	<label>优&ensp;惠&ensp;价：</label>
				    	<input id="pricePromotional" type="text" class="dfinput" value="" />&ensp;元
				    </li>
				    <li class="contentWapper" name="priceLi">
				    	<label>积&emsp;&emsp;分：</label>
				    	<input id="score" type="text" class="dfinput" value="" />&ensp;分
				    </li>
				    <li class="contentWapper" name="priceLi">
				    	<label>市&ensp;场&ensp;价：</label>
				    	<input id="priceOriginal" type="text" class="dfinput" value="" />&ensp;元
				    </li>
				    <li>
				    	<label>&nbsp;</label>
				    	<input id="submitBtn" type="button" class="btn-blue" value="确认"/>&nbsp;&nbsp;
				    	<input id="closeBtn" type="button" class="btn-blue" value="关闭"/>
				    </li>
			    </ul>
	        </div>
	    </div>
	</body>
	<script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
	<script type="text/javascript" src="/js/commonList.js"></script>
	<script type="text/javascript">
		/** 删除的URL地址前缀，在commonList.js里面调用的删除方法会用到 */
		var delUrl = "/user/info";
	</script>
</html>